	<div class="site-nav" id="site-nav">
		<div class="w w1390">
			<div class="fl">
				<!-- 登录信息 -->
				<div class="txt-info" id="ECS_MEMBERZONE">			
				</div>
				<!-- js -->
				<div class="scrollBody" id="scrollBody">

				</div>

			</div>
			<ul class="quick-menu fr">
				<li>
					<div class="dt"><a href="{:url('member/User/index')}">用户中心</a></div>
				</li>
				<li class="spacer"></li>
				<li>
					<div class="dt"><a href="{:url('member/Order/orderList')}">我的订单</a></div>
				</li>
				<li class="spacer"></li>
				<li>
					<div class="dt"><a href="#">我的浏览</a></div>
				</li>
				<li class="spacer"></li>
				<li>
					<div class="dt"><a href="#">我的收藏</a></div>
				</li>
				<li class="spacer"></li>
				<li>
					<div class="dt"><a href="#">客服服务</a></div>
				</li>
				<li class="spacer"></li>
				
			</ul>
		</div>
	</div>

	<div class="header">
		<div class="w w1390">
			<div class="logo">
				<div class="logoImg"><a href="#"><img src="__index__/img/logo.png" /></a></div>
			</div>
			<div class="dsc-search">
				<div class="form">
					<form id="searchForm" name="searchForm" method="get" action="search.php" onSubmit="return checkSearchForm()" class="search-form">
						<input autocomplete="off" onKeyUp="lookup(this.value);" name="keywords" type="text" id="keyword" value="{$configs.search_value}" class="search-text"/>
						<input type="hidden" name="store_search_cmt" value="0">
						<button type="submit" class="button button-goods" onclick="checkstore_search_cmt(0)" >搜商品</button>
					</form>
					<ul class="keyword">
						<?php $arr=explode(',',$configs['search_keywords']);
						foreach($arr as $k=>$v):
						?>
						<li><a href="#" target="_blank">{$v}</a></li>
						<?php endforeach;?>
					</ul>
					
					<div class="suggestions_box" id="suggestions" style="display:none;">
						<div class="suggestions_list" id="auto_suggestions_list">
							&nbsp;
						</div>
					</div>
					
				</div>
			</div>
			<div class="shopCart" data-ectype="dorpdown" id="ECS_CARTINFO" data-carteveval="0">
				
				<div class="shopCart-con dsc-cm">
					<a href="{:url('index/Flow/flow1')}">
						<i class="iconfont icon-carts"></i>
						<span>我的购物车</span>
						<em id="CartNum" class="count cart_num">0</em>
					</a>
				</div>
		

				<script type="text/javascript">

			

					function changenum(rec_id, diff, warehouse_id, area_id)
					{
						var cValue = $('#cart_value').val();
						var goods_number =Number($('#goods_number_' + rec_id).text()) + Number(diff);
						
						if(goods_number < 1)
						{
							return false;	
						}
						else
						{
							change_goods_number(rec_id,goods_number, warehouse_id, area_id, cValue);
						}
					}
					function change_goods_number(rec_id, goods_number, warehouse_id, area_id, cValue)
					{
						if(cValue != '' || cValue == 'undefined'){
							var cValue = $('#cart_value').val(); 
						}   
						Ajax.call('flow.php?step=ajax_update_cart', 'rec_id=' + rec_id +'&goods_number=' + goods_number +'&cValue=' + cValue +'&warehouse_id=' + warehouse_id +'&area_id=' + area_id, change_goods_number_response, 'POST','JSON');                
					}
					function change_goods_number_response(result)
					{    
						var rec_id = result.rec_id;           
						if (result.error == 0)
						{
       $('#goods_number_' +rec_id).val(result.goods_number);//更新数量
       $('#goods_subtotal_' +rec_id).html(result.goods_subtotal);//更新小计
       if (result.goods_number <= 0)
       {
			//数量为零则隐藏所在行
			$('#tr_goods_' +rec_id).style.display = 'none';
			$('#tr_goods_' +rec_id).innerHTML = '';
		}
        $('#total_desc').html(result.flow_info);//更新合计
        if($('ECS_CARTINFO'))
        {//更新购物车数量
        	$('#ECS_CARTINFO').html(result.cart_info);
        }

        if(result.group.length > 0){
        	for(var i=0; i<result.group.length; i++){
				$("#" + result.group[i].rec_group).html(result.group[i].rec_group_number);//配件商品数量
				$("#" + result.group[i].rec_group_talId).html(result.group[i].rec_group_subtotal);//配件商品金额
			}
		}

		$("#goods_price_" + rec_id).html(result.goods_price);
		$(".cart_num").html(result.subtotal_number);
	}
	else if (result.message != '')
	{
		$('#goods_number_' +rec_id).val(result.cart_Num);//更新数量
		alert(result.message);
	}                
}

function deleteCartGoods(rec_id,index)
{
	Ajax.call('delete_cart_goods.php', 'id='+rec_id+'&index='+index, deleteCartGoodsResponse, 'POST', 'JSON');
}

/**
 * 接收返回的信息
 */
 function deleteCartGoodsResponse(res)
 {
 	if (res.error)
 	{
 		alert(res.err_msg);
 	}
 	else if(res.index==1)
 	{
 		Ajax.call('get_ajax_content.php?act=get_content', 'data_type=cart_list', return_cart_list, 'POST', 'JSON');
 	}
 	else
 	{
 		$("#ECS_CARTINFO").html(res.content);
 		$(".cart_num").html(res.cart_num);
 	}
 }

 function return_cart_list(result)
 {
 	$(".cart_num").html(result.cart_num);
 	$(".pop_panel").html(result.content);
 	tbplHeigth();
 }
</script>        </div>
</div>
</div>
<div class="nav dsc-zoom">
	<div class="w w1390">
		<div class="categorys <?php if(!isset($show_nav)){ echo 'site-mast'; } ?>">
			<div class="categorys-type"><a href="#" target="_blank">全部商品分类</a></div>
			<div class="categorys-tab-content">
				<div class="categorys-items" id="cata-nav">
					{volist name="CategoryRes" id="vo"}
					<div class="categorys-item" ectype="cateItem" data-id="{$vo.id}" data-eveval="0">
						<div class="item item-content">
							<i class="iconfont icon-ele"></i>
							<div class="categorys-title">
								<strong>
									<a href="{:url('index/Category/index',array('id'=>$vo['id'],'topId'=>$vo['id']))}" target="_blank">{$vo.cate_name}</a>
								</strong>
								<span>
									{volist name="vo.children" id="vo1"}
									{if condition="$i lt 3"}
									<a href="{:url('index/Category/index',array('id'=>$vo1['id'],'topId'=>$vo['id'],'Sid'=>$vo1['id']))}" target="_blank">{$vo1.cate_name}</a>
									{/if}
									{/volist}
									
								</span>
							</div>
						</div>
						<div class="categorys-items-layer" ectype="cateLayer">
							<div class="cate-layer-con clearfix">
								<div class="cate-layer-left">
									<div class="cate_channel" ectype="channels_{$vo.id}"></div>
									<div class="cate_detail" ectype="subitems_{$vo.id}">
										
									</div>
								</div>
								<div class="cate-layer-rihgt" ectype="brands_{$vo.id}"></div>
							</div>
						</div>
						<div class="clear"></div>
					</div>
					{/volist}
					
						
					</div>
				</div>
			</div>
			<div class="nav-main" id="nav">
				<ul class="navitems">
					<li><a href="#" class="curr">首页</a></li>
					{volist name="NavRes.mid" id="vo"}
					<li><a href="#">{$vo.nav_name}</a></li>
					{/volist}
				</ul>
			</div>
		</div>
	</div>

	<!-- ajax异步请求登录信息 -->
<script type="text/javascript">

	var ajax_cate_url="{:url('index/Category/getCateInfo')}";
	$(function(){
		$.ajax({
			type:"post",
			url:"{:url('member/Account/checkLogin')}",
			dataType:"json",
			success:function(data){
				if(data.error==0){
					html='<span>您好 &nbsp;<a href="#">'+data.username+'</a></span><span>，欢迎来到&nbsp;<a alt="首页" title="首页" href="#">php商城</a></span><span>[<a href="{:url("member/User/logout")}">退出</a>]</span>';
					$("#ECS_MEMBERZONE").html(html);
				}else{
					html='<a href="{:url("member/Account/login")}" class="link-login red">请登录</a><a href="{:url("member/Account/reg")}" class="link-regist">免费注册</a>';
					$("#ECS_MEMBERZONE").html(html);

				}
			}
		});

//头部购物车信息
		$.ajax({
			type:"post",
			url:"{:url('index/Flow/getCartNum')}",
			dataType:"json",
			success:function(data){
				$("#CartNum").html(data);
			}
		});
	});
</script>




	